<?php
	//remedies are listed in order of symptoms:
		//anxiety, cravings, headache, muscle aches
	$remedies = array('anxiety' => array("Warm bath", "Light exercise", "Herbs, such as Rhodiola"), 'cravings' => array("Find a distraction", "Drink orange juice", "Eat carrot sticks"), 'headaches' => array("Nurofen", "Cold compress", "Glass of water"), 'muscleaches' => array("Remedial massage","Anti-inflammatory medication", "Warm bath with soothing salts"));
	
	$info = array('anxiety' => "Nicotine stimulates areas of the brain which are pleasure related, giving the feeling of relaxation. While quitting, feeling anxious is normal.", 'cravings' => "Nicotine is addictive, and cravings last on average five minutes. ", 'headaches' => "Headaches may occur as your body gets more oxygen. Weaning off cigarettes slowly can help reduce this symptom.", 'muscleaches' => "Quitting smoking may cause symptoms similar to an inflammatory response, causing muscle pain.");
	
	if(isset($_GET['q'])) {
		$symptom = $_GET['q'];
		if ($symptom == "default") echo "";
		else {
			$index = 1;
			echo "<br /><p id='remedy-info'>".$info[$symptom]."</p><br />";
			echo "<p id='remedy-caption'>Top-ranked remedies from the iQuit community:</p>";
			echo "<ul id='remedy-list'>";
			foreach ($remedies[$symptom] as $value) {
				echo "<li>#".$index."   ".$value."</li>";
				$index++;
			}
			echo "</ul>";
		}
	}
	
?>